﻿<Window x:Class="MyCamera.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" SizeToContent="WidthAndHeight"
    MinHeight="500" MinWidth="500" Title="MyCamera" Loaded="Window_Loaded" Closing="Window_Closing">
    
    <Window.Background>
        <LinearGradientBrush x:Name="AppBackground" StartPoint="0,0" EndPoint="0,1" >
            <GradientStop Color="#C3C3C3" Offset="0.20"/>
            <GradientStop Color="#A3A3A3" Offset="0.60"/>
            <GradientStop Color="#9D9D9D" Offset="1"/>
        </LinearGradientBrush>
    </Window.Background>
    
    <Window.Resources>
        <ResourceDictionary Source="Resources.xaml"/>
    </Window.Resources>
        
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        
        <GroupBox Margin="5" Header="Options" Foreground="Black" FontWeight="Bold" Grid.ColumnSpan="2" BorderBrush="White">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                
                <StackPanel Orientation="Horizontal" Grid.Column="0" Margin="5">
                    <TextBlock Text="Camera (Where):" HorizontalAlignment="Left" Margin="0,0,5,0" VerticalAlignment="Center"/>
                    <TextBox Name="whereCameraTxt" Width="100" Height="23" HorizontalAlignment="Left"/>
                </StackPanel>
                
                <StackPanel Orientation="Horizontal" Grid.Column="2" Margin="5">
                    <Button Name="changeBtn" Content="Change" Width="60" Height="27" FontWeight="Normal" Margin="0,0,5,0" Click="changeBtn_Click" IsEnabled="False"/>
                    <Button Name="connectBtn" Content="Connect" Width="60" Height="27" FontWeight="Normal" Margin="0,0,5,0" Click="connectBtn_Click"/>
                    <Button Name="optionsBtn" Content="Options" Width="60" Height="27" FontWeight="Normal" Click="optionsBtn_Click"/>
                </StackPanel>
            </Grid>
        </GroupBox>
        
        <Grid Grid.Column="0" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <GroupBox Margin="5" Header="Move" Foreground="Black" FontWeight="Bold" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="White">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>


                    <Button Name="moveLeftBtn" Grid.Column="0" Grid.Row="1" Width="40" Height="40" HorizontalAlignment="Left" Template="{StaticResource ImageButton}">
                        <Image Source="Resources/arrlf.png"/>
                    </Button>

                    <Button Name="moveUpBtn" Grid.Column="1" Grid.Row="0" Width="40" Height="40" HorizontalAlignment="Center" Template="{StaticResource ImageButton}">
                        <Image x:Name="image" Source="Resources/arrup.png"/>
                    </Button>

                    <Button Name="zoomRigthBtn" Grid.Column="2" Grid.Row="1" Width="40" Height="40" HorizontalAlignment="Right" Template="{StaticResource ImageButton}">
                        <Image Source="Resources/arrrg.png"/>
                    </Button>

                    <Button Name="zoomDownBtn" Grid.Column="1" Grid.Row="2" Width="40" Height="40" HorizontalAlignment="Center" Template="{StaticResource ImageButton}">
                        <Image Source="Resources/arrdw.png"/>
                    </Button>

                </Grid>
            </GroupBox>

            <GroupBox Margin="5" Foreground="Black" FontWeight="Bold" Header="Zoom" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="White">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <Button Name="zoomMinBtn" Grid.Column="0" Width="40" Height="40" HorizontalAlignment="Left" Template="{StaticResource ImageButton}" Click="zoomMinBtn_Click">
                        <Image Source="Resources/btnmin.png"/>
                    </Button>

                    <Button Name="zoomPlusBtn" Grid.Column="1" Width="40" Height="40" HorizontalAlignment="Right" Template="{StaticResource ImageButton}" Click="zoomPlusBtn_Click">
                        <Image Source="Resources/btnplus.png"/>
                    </Button>
                </Grid>
            </GroupBox>

            <GroupBox Margin="5" Foreground="Black" FontWeight="Bold" Header="Contrast" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="White">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <Button Name="contrastMinBtn" Grid.Column="0" Width="40" Height="40" HorizontalAlignment="Left" Template="{StaticResource ImageButton}" Click="contrastMinBtn_Click">
                        <Image Source="Resources/btnmin.png"/>
                    </Button>

                    <Button Name="contrastPlusBtn" Grid.Column="1" Width="40" Height="40" HorizontalAlignment="Right" Template="{StaticResource ImageButton}" Click="contrastPlusBtn_Click">
                        <Image Source="Resources/btnplus.png"/>
                    </Button>
                </Grid>
            </GroupBox>

            <GroupBox Margin="5" Foreground="Black" FontWeight="Bold" Header="Color" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="White">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <Button Name="colorMinBtn" Grid.Column="0" Width="40" Height="40" HorizontalAlignment="Left" Template="{StaticResource ImageButton}" Click="colorMinBtn_Click">
                        <Image Source="Resources/btnmin.png"/>
                    </Button>

                    <Button Name="colorPlusBtn" Grid.Column="1" Width="40" Height="40" HorizontalAlignment="Right" Template="{StaticResource ImageButton}" Click="colorPlusBtn_Click">
                        <Image Source="Resources/btnplus.png"/>
                    </Button>
                </Grid>
            </GroupBox>

            <GroupBox Margin="5" Foreground="Black" FontWeight="Bold" Header="Quality" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="White">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <Button Name="qualityMinBtn" Grid.Column="0" Width="40" Height="40" HorizontalAlignment="Left" Template="{StaticResource ImageButton}" Click="qualityMinBtn_Click">
                        <Image Source="Resources/btnmin.png"/>
                    </Button>

                    <Button Name="qualityPlusBtn" Grid.Column="1" Width="40" Height="40" HorizontalAlignment="Right" Template="{StaticResource ImageButton}" Click="qualityPlusBtn_Click">
                        <Image Source="Resources/btnplus.png"/>
                    </Button>
                </Grid>
            </GroupBox>

            <GroupBox Margin="5" Foreground="Black" FontWeight="Bold" Header="Brightness" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="White">
                <Grid Margin="5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>

                    <Button Name="brightnessMinBtn" Grid.Column="0" Width="40" Height="40" HorizontalAlignment="Left" Template="{StaticResource ImageButton}" Click="brightnessMinBtn_Click">
                        <Image Source="Resources/btnmin.png"/>
                    </Button>

                    <Button Name="brightnessPlusBtn" Grid.Column="1" Width="40" Height="40" HorizontalAlignment="Right" Template="{StaticResource ImageButton}" Click="brightnessPlusBtn_Click">
                        <Image Source="Resources/btnplus.png"/>
                    </Button>
                </Grid>
            </GroupBox>
        </Grid>

        <GroupBox Header="Camera" Foreground="Black" FontWeight="Bold" Grid.Column="1" Grid.Row="1" BorderBrush="White" Margin="5">
            <Image x:Name="cameraImage" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5"/>
        </GroupBox>

    </Grid>
</Window>
